﻿using System;
using Microsoft.EntityFrameworkCore.Migrations;

namespace Enterprise.Migrations
{
    public partial class 给时间timestamp加上毫秒 : Migration
    {
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.AlterColumn<DateTime>(
                name: "UPDATED_TIME",
                table: "MDT_ORDER",
                type: "TIMESTAMP(3)",
                nullable: false,
                oldClrType: typeof(DateTime),
                oldType: "TIMESTAMP");

            migrationBuilder.AlterColumn<DateTime>(
                name: "UPDATED_TIME",
                table: "MDT_MASTER",
                type: "TIMESTAMP(3)",
                nullable: false,
                oldClrType: typeof(DateTime),
                oldType: "TIMESTAMP");

            migrationBuilder.AlterColumn<string>(
                name: "GROUP_NAME",
                table: "MDT_GROUP",
                type: "VARCHAR(30)",
                nullable: false,
                oldClrType: typeof(string),
                oldType: "VARCHAR(30)",
                oldNullable: true);

            migrationBuilder.AlterColumn<DateTime>(
                name: "UPDATED_TIME",
                table: "MDT_COMMENT",
                type: "TIMESTAMP(3)",
                nullable: false,
                oldClrType: typeof(DateTime),
                oldType: "TIMESTAMP");
        }

        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.AlterColumn<DateTime>(
                name: "UPDATED_TIME",
                table: "MDT_ORDER",
                type: "TIMESTAMP",
                nullable: false,
                oldClrType: typeof(DateTime),
                oldType: "TIMESTAMP(3)");

            migrationBuilder.AlterColumn<DateTime>(
                name: "UPDATED_TIME",
                table: "MDT_MASTER",
                type: "TIMESTAMP",
                nullable: false,
                oldClrType: typeof(DateTime),
                oldType: "TIMESTAMP(3)");

            migrationBuilder.AlterColumn<string>(
                name: "GROUP_NAME",
                table: "MDT_GROUP",
                type: "VARCHAR(30)",
                nullable: true,
                oldClrType: typeof(string),
                oldType: "VARCHAR(30)");

            migrationBuilder.AlterColumn<DateTime>(
                name: "UPDATED_TIME",
                table: "MDT_COMMENT",
                type: "TIMESTAMP",
                nullable: false,
                oldClrType: typeof(DateTime),
                oldType: "TIMESTAMP(3)");
        }
    }
}
